#!/usr/bin/evn python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   文件名称 :     redis_conf
   文件功能描述 :   功能描述
   创建人 :       小钟同学
   创建时间 :          2021/6/9
-------------------------------------------------
   修改描述-2021/6/9:         
-------------------------------------------------
"""
from functools import lru_cache
from pydantic import BaseSettings
import pprint
from pydantic import AnyUrl, BaseSettings
import os
pp = pprint.PrettyPrinter(indent=4)



class JaegerSettings(BaseSettings):
    #  没有值的情况下的默认值--默认情况下读取的环境变量的值
    reporting_host: str = '127.0.0.1'
    reporting_port: int = 6831
    service_name:str = 'grpc_serve'
    validate:bool = True
    config_logging:bool = True
    # 采样类型
    sampler_type: str = 'const'
    # 采样开关 1：开启全部采样 0：关闭全部
    sampler_param: int = 1


@lru_cache()
def get_settings():
    return JaegerSettings()


# 配置实例的对象的创建
jaegerconf = get_settings()
